// 公共头部
import myHeader from "/pages/headerfoot/pages/header.vue";
//公共底部
import Tabbar from '/pages/headerfoot/pages/hitgamefooter.vue'
//打帮赛方法
import hitmatchcommon from '@/common/hitmatchcommon.js';
//cache缓存
import Cache from '@/utils/cache.js';

export default {
	components: {
		myHeader,
		Tabbar
	},
	data() {
		return {
			list: [], //赛事
			make_id: '', //赛事ID
			nake_name:'',//nake_name名称
		}
	},
	onLoad(option) {
		var that = this;
		if (option.id) {
			that.make_id = option.id;
			that.getMake(); //得到赛事参赛列表
		}

	},
	methods: {
		//获取赛事
		async getMake() {
			var that = this;
			var data = {};
			data['make_id'] = that.make_id;
			data['make_user_id'] = Cache.get('user_id');
			hitmatchcommon.getMakeLibMethod(data).then(res => {
				if (res) {
					that.list = res; //赛季列表
					that.nake_name=res.nake_name;
				}
			});
		},
	}
}